package com.sos.widget.view.refresh;

import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;

import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.scwang.smart.refresh.layout.constant.SpinnerStyle;
import com.sos.widget.R;

/**
 * 经典
 */
public class ThemeClassicsRefreshLayout extends SmartRefreshLayout {
   public static Integer themeColor = Color.parseColor("#333333");
    public ThemeClassicsRefreshLayout(Context context) {
        super(context);
        initView(context);
    }

    public ThemeClassicsRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public void initView(Context context) {
        setRefreshHeader(new ClassicsHeader(context).setAccentColor(themeColor));
        setRefreshFooter(new ClassicsFooter(context).
                setSpinnerStyle(SpinnerStyle.FixedBehind).
                setPrimaryColor(getResources().getColor(R.color.c_f6f6f6)).
                setAccentColor(themeColor));
    }
}
